package javase.ch06;

import javase.ch06.junit.UserSerevice;
import org.junit.Assert;


public class UserSereviceTest {
    private UserSerevice userSerevice;

    @org.junit.Before
    public void setUp() throws Exception {
        System.out.println("============befor==================");
        userSerevice = new UserSerevice();
    }

    @org.junit.After
    public void tearDown() throws Exception {
        System.out.println("============after==================");

    }

    @org.junit.Test
    public void login() {
        System.out.println("============test==================");
        boolean login = userSerevice.login("admin", "admin");
        //System.out.println( login);
        Assert.assertEquals("登陆失败", true, login);
    }

    @org.junit.Test
    public void register() {
        boolean register = userSerevice.register("admin", "admin");
        System.out.println(register);
        System.out.println("======================================");
    }
}